#ifndef CONVEX_HULL_H
#define CONVEX_HULL_H

#include <vector>
#include <LinearMath\btConvexHullComputer.h>
#include <LinearMath\btAlignedObjectArray.h>

class ConvexHull
{
public:
	
	struct Tri
	{
		btVector3 v0;
		btVector3 v1;
		btVector3 v2;
	};

	struct Face
	{
		void AddTri(const btVector3& v0, const btVector3& v1, const btVector3& v2)
		{
			Tri tri;
			tri.v0 = v0;
			tri.v1 = v1;
			tri.v2 = v2;
			m_tris.push_back(tri);
		}
	
		btAlignedObjectArray<Tri> m_tris;
		//std::vector<Tri> m_tris;
	};

	void AddFace(const Face& face);
	void Draw();
	std::vector<Face>* GetFaces();

private:
	std::vector<Face> m_faces;
};

#endif